package com.credithc.customers.dataservice.kafka;

import com.credithc.customers.dataservice.service.DataConversionService;
import com.credithc.customers.dataservice.service.OldDlrDataService;
import com.credithc.customers.dataservice.service.ServiceSystemUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;


@Component
public class KafkaConsumer {
    @Autowired
    DataConversionService dataConversionService;
    @Autowired
    ServiceSystemUserService serviceSystemUserService;
    @Autowired
    OldDlrDataService oldDlrDataService;
    @KafkaListener(topics = {"ext.baseserver.yzt.dlr.qm_lend_order","ext.baseserver.yzt.dlr.qm_product_manager","ext.baseserver.yzt.dlr.qm_user","ext.baseserver.yzt.dlr.qm_user_card"})
    public void dataDLR(String message){
        dataConversionService.binlogConversion(message);

    }
    @KafkaListener(topics = {"ext.baseserver.yzt.hyr.dtpay","ext.baseserver.yzt.hyr.lenduinfo","ext.baseserver.yzt.hyr.hyr_user_message","ext.baseserver.yzt.hyr.userbank"})
    public void dataHYR(String message){
        dataConversionService.binlogConversion(message);
    }
    @KafkaListener(topics = {"hyd.jsd_loan_order","hyd.jsd_debit_card"})
    public void dataHYD(String message){
        dataConversionService.binlogConversion(message);
    }
    @KafkaListener(topics = {"ext.baseserver.yzt.xhqb.hw_user","ext.baseserver.yzt.xhqb.hw_order","ext.baseserver.yzt.xhqb.hw_binded_bank_card"})
    public void dataXHQB(String message){
        dataConversionService.binlogConversion(message);
    }
    @KafkaListener(topics = {"ext.baseserver.yzt.jhzf.merchant_user","ext.baseserver.yzt.jhzf.merchant_bank_account"})
    public void dataJHZF(String message){

        dataConversionService.binlogConversion(message);
    }
    @KafkaListener(topics={"pl.crm_intopieces_dk","pl.crm_account_mes_dk","pl.crm_repay_dk","pl.crm_intopieces_info_dk"})
   // @KafkaListener(topics={"ext.baseserver.yzt.test.crm_intopieces_dk","ext.baseserver.yzt.test.crm_account_mes_dk","ext.baseserver.yzt.test.crm_repay_dk","ext.baseserver.yzt.test.crm_intopieces_info_dk"})
    public void dataGD(String message){
        dataConversionService.binlogConversion(message);
    }

    @KafkaListener(topics={"ext.baseserver.yzt.xd.microloan_user","ext.baseserver.yzt.xd.microloan_user_auths"})
    //@KafkaListener(topics={"ext.baseserver.yzt.test.microloan_user","ext.baseserver.yzt.test.microloan_user_auths"})
    public void dataXD(String message){
        dataConversionService.binlogConversion(message);
    }


    @KafkaListener(topics={"ext.baseserver.yzt.xt.entrust_user","ext.baseserver.yzt.xt.entrust_user_auths"})
    //@KafkaListener(topics={"ext.baseserver.yzt.test.entrust_user","ext.baseserver.yzt.test.entrust_user_auths"})
    public void dataXT(String message){
        dataConversionService.binlogConversion(message);
    }

   @KafkaListener(topics = {"ext.baseserver.yzt.hhr_jk.users","ext.baseserver.yzt.hhr_jk.bank_account"})
   //@KafkaListener(topics = {"ext.baseserver.yzt.test.users","ext.baseserver.yzt.test.bank_account"})
    public void dataHHRJK(String message){ dataConversionService.binlogConversion(message);}

    @KafkaListener(topics = {"ext.baseserver.yzt.bdb.hrhb_productdef","ext.baseserver.yzt.bdb.hrhb_order_insure"})
    public void dataBDB(String message){
        dataConversionService.binlogConversion(message);}
    @KafkaListener(topics = {"ext.baseserver.yzt.fund.ppf_fund","ext.baseserver.yzt.fund.ppf_customer"})
    public void dataJJ(String message){
        dataConversionService.binlogConversion(message);
    }
    @KafkaListener(topics = {"ext.baseserver.yzt.bxhx.pro_info","ext.baseserver.yzt.bxhx.sale_policy"})
    public void dataHXBX(String message){
        dataConversionService.binlogConversion(message);
    }
    @KafkaListener(topics = {"ext.baseserver.yzt.chd.FL_Prod_Base","ext.baseserver.yzt.chd.fl_business_common","ext.baseserver.yzt.chd.fl_contract"})
    public void dataCHD(String message){
        dataConversionService.binlogConversion(message);
    }
    @KafkaListener(topics = {"ext.baseserver.yzt.jwbx.oi_products","ext.baseserver.yzt.jwbx.oi_proposalform"})
    public void dataJWBX(String message){
        dataConversionService.binlogConversion(message);
    }

//    @KafkaListener(topics = {"ext.baseserver.yzt.hhrcj.f_product","ext.baseserver.yzt.hhrcj.f_user_info","ext.baseserver.yzt.hhrcj.f_lender_detail"})
//    public void dataHHRCJD(String message){
//
//        dataConversionService.binlogConversion(message);
//    }
}
